3.325 \(\int x (f+g x^2)^2 \log (c (d+e x^2)^p) \, dx\)

Optimal. Leaf size=124 \[ \frac{\left (f+g x^2\right )^3 \log \left (c \left (d+e x^2\right )^p\right )}{6 g}-\frac{p x^2 (e f-d g)^2}{6 e^2}-\frac{p (e f-d g)^3 \log \left (d+e x^2\right )}{6 e^3 g}-\frac{p \left (f+g x^2\right )^2 (e f-d g)}{12 e g}-\frac{p \left (f+g x^2\right )^3}{18 g} \]

[Out]

-((e*f - d*g)^2*p*x^2)/(6*e^2) - ((e*f - d*g)*p*(f + g*x^2)^2)/(12*e*g) - (p*(f + g*x^2)^3)/(18*g) - ((e*f - d
*g)^3*p*Log[d + e*x^2])/(6*e^3*g) + ((f + g*x^2)^3*Log[c*(d + e*x^2)^p])/(6*g)

________________________________________________________________________________________

Rubi [A]  time = 0.140923, antiderivative size = 124, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {2475, 2395, 43} \[ \frac{\left (f+g x^2\right )^3 \log \left (c \left (d+e x^2\right )^p\right )}{6 g}-\frac{p x^2 (e f-d g)^2}{6 e^2}-\frac{p (e f-d g)^3 \log \left (d+e x^2\right )}{6 e^3 g}-\frac{p \left (f+g x^2\right )^2 (e f-d g)}{12 e g}-\frac{p \left (f+g x^2\right )^3}{18 g} \]

Antiderivative was successfully verified.

[In]

Int[x*(f + g*x^2)^2*Log[c*(d + e*x^2)^p],x]

[Out]

-((e*f - d*g)^2*p*x^2)/(6*e^2) - ((e*f - d*g)*p*(f + g*x^2)^2)/(12*e*g) - (p*(f + g*x^2)^3)/(18*g) - ((e*f - d
*g)^3*p*Log[d + e*x^2])/(6*e^3*g) + ((f + g*x^2)^3*Log[c*(d + e*x^2)^p])/(6*g)

Rule 2475

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int x \left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int (f+g x)^2 \log \left (c (d+e x)^p\right ) \, dx,x,x^2\right )\\ &=\frac{\left (f+g x^2\right )^3 \log \left (c \left (d+e x^2\right )^p\right )}{6 g}-\frac{(e p) \operatorname{Subst}\left (\int \frac{(f+g x)^3}{d+e x} \, dx,x,x^2\right )}{6 g}\\ &=\frac{\left (f+g x^2\right )^3 \log \left (c \left (d+e x^2\right )^p\right )}{6 g}-\frac{(e p) \operatorname{Subst}\left (\int \left (\frac{g (e f-d g)^2}{e^3}+\frac{(e f-d g)^3}{e^3 (d+e x)}+\frac{g (e f-d g) (f+g x)}{e^2}+\frac{g (f+g x)^2}{e}\right ) \, dx,x,x^2\right )}{6 g}\\ &=-\frac{(e f-d g)^2 p x^2}{6 e^2}-\frac{(e f-d g) p \left (f+g x^2\right )^2}{12 e g}-\frac{p \left (f+g x^2\right )^3}{18 g}-\frac{(e f-d g)^3 p \log \left (d+e x^2\right )}{6 e^3 g}+\frac{\left (f+g x^2\right )^3 \log \left (c \left (d+e x^2\right )^p\right )}{6 g}\\ \end{align*}

Mathematica [A]  time = 0.106705, size = 135, normalized size = 1.09 \[ \frac{e \left (6 e \left (3 d f^2+e x^2 \left (3 f^2+3 f g x^2+g^2 x^4\right )\right ) \log \left (c \left (d+e x^2\right )^p\right )-p x^2 \left (6 d^2 g^2-3 d e g \left (6 f+g x^2\right )+e^2 \left (18 f^2+9 f g x^2+2 g^2 x^4\right )\right )\right )+6 d^2 g p (d g-3 e f) \log \left (d+e x^2\right )}{36 e^3} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(f + g*x^2)^2*Log[c*(d + e*x^2)^p],x]

[Out]

(6*d^2*g*(-3*e*f + d*g)*p*Log[d + e*x^2] + e*(-(p*x^2*(6*d^2*g^2 - 3*d*e*g*(6*f + g*x^2) + e^2*(18*f^2 + 9*f*g
*x^2 + 2*g^2*x^4))) + 6*e*(3*d*f^2 + e*x^2*(3*f^2 + 3*f*g*x^2 + g^2*x^4))*Log[c*(d + e*x^2)^p]))/(36*e^3)

________________________________________________________________________________________

Maple [C]  time = 0.587, size = 599, normalized size = 4.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(g*x^2+f)^2*ln(c*(e*x^2+d)^p),x)

[Out]

1/12/e*d*g^2*p*x^4-1/6/e^2*d^2*g^2*p*x^2+1/6/e^3*ln(e*x^2+d)*d^3*g^2*p+1/2/e*ln(e*x^2+d)*d*f^2*p-1/12*I*Pi*g^2
*x^6*csgn(I*c*(e*x^2+d)^p)^3-1/4*I*Pi*f^2*x^2*csgn(I*c*(e*x^2+d)^p)^3-1/18*g^2*p*x^6-1/2*f^2*p*x^2-1/2*d^2*f*g
*p*ln(e*x^2+d)/e^2-1/4*f*g*p*x^4+1/6*ln(c)*g^2*x^6+1/2*ln(c)*f^2*x^2+(1/6*g^2*x^6+1/2*f*g*x^4+1/2*f^2*x^2)*ln(
(e*x^2+d)^p)+1/2*ln(c)*f*g*x^4+1/4*I*Pi*f*g*x^4*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)+1/4*I*Pi*f*g*x^4*csgn(I*(e*x
^2+d)^p)*csgn(I*c*(e*x^2+d)^p)^2-1/4*I*Pi*f*g*x^4*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)*csgn(I*c)+1/2*d*f*
g*p*x^2/e-1/4*I*Pi*f*g*x^4*csgn(I*c*(e*x^2+d)^p)^3-1/12*I*Pi*g^2*x^6*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)
*csgn(I*c)-1/4*I*Pi*f^2*x^2*csgn(I*(e*x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)*csgn(I*c)+1/12*I*Pi*g^2*x^6*csgn(I*(e*x^
2+d)^p)*csgn(I*c*(e*x^2+d)^p)^2+1/4*I*Pi*f^2*x^2*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)+1/4*I*Pi*f^2*x^2*csgn(I*(e*
x^2+d)^p)*csgn(I*c*(e*x^2+d)^p)^2+1/12*I*Pi*g^2*x^6*csgn(I*c*(e*x^2+d)^p)^2*csgn(I*c)

________________________________________________________________________________________

Maxima [A]  time = 1.01013, size = 205, normalized size = 1.65 \begin{align*} \frac{{\left (g x^{2} + f\right )}^{3} \log \left ({\left (e x^{2} + d\right )}^{p} c\right )}{6 \, g} - \frac{e p{\left (\frac{2 \, e^{2} g^{3} x^{6} + 3 \,{\left (3 \, e^{2} f g^{2} - d e g^{3}\right )} x^{4} + 6 \,{\left (3 \, e^{2} f^{2} g - 3 \, d e f g^{2} + d^{2} g^{3}\right )} x^{2}}{e^{3}} + \frac{6 \,{\left (e^{3} f^{3} - 3 \, d e^{2} f^{2} g + 3 \, d^{2} e f g^{2} - d^{3} g^{3}\right )} \log \left (e x^{2} + d\right )}{e^{4}}\right )}}{36 \, g} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(g*x^2+f)^2*log(c*(e*x^2+d)^p),x, algorithm="maxima")

[Out]

1/6*(g*x^2 + f)^3*log((e*x^2 + d)^p*c)/g - 1/36*e*p*((2*e^2*g^3*x^6 + 3*(3*e^2*f*g^2 - d*e*g^3)*x^4 + 6*(3*e^2
*f^2*g - 3*d*e*f*g^2 + d^2*g^3)*x^2)/e^3 + 6*(e^3*f^3 - 3*d*e^2*f^2*g + 3*d^2*e*f*g^2 - d^3*g^3)*log(e*x^2 + d
)/e^4)/g

________________________________________________________________________________________

Fricas [A]  time = 1.7619, size = 379, normalized size = 3.06 \begin{align*} -\frac{2 \, e^{3} g^{2} p x^{6} + 3 \,{\left (3 \, e^{3} f g - d e^{2} g^{2}\right )} p x^{4} + 6 \,{\left (3 \, e^{3} f^{2} - 3 \, d e^{2} f g + d^{2} e g^{2}\right )} p x^{2} - 6 \,{\left (e^{3} g^{2} p x^{6} + 3 \, e^{3} f g p x^{4} + 3 \, e^{3} f^{2} p x^{2} +{\left (3 \, d e^{2} f^{2} - 3 \, d^{2} e f g + d^{3} g^{2}\right )} p\right )} \log \left (e x^{2} + d\right ) - 6 \,{\left (e^{3} g^{2} x^{6} + 3 \, e^{3} f g x^{4} + 3 \, e^{3} f^{2} x^{2}\right )} \log \left (c\right )}{36 \, e^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(g*x^2+f)^2*log(c*(e*x^2+d)^p),x, algorithm="fricas")

[Out]

-1/36*(2*e^3*g^2*p*x^6 + 3*(3*e^3*f*g - d*e^2*g^2)*p*x^4 + 6*(3*e^3*f^2 - 3*d*e^2*f*g + d^2*e*g^2)*p*x^2 - 6*(
e^3*g^2*p*x^6 + 3*e^3*f*g*p*x^4 + 3*e^3*f^2*p*x^2 + (3*d*e^2*f^2 - 3*d^2*e*f*g + d^3*g^2)*p)*log(e*x^2 + d) -
6*(e^3*g^2*x^6 + 3*e^3*f*g*x^4 + 3*e^3*f^2*x^2)*log(c))/e^3

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(g*x**2+f)**2*ln(c*(e*x**2+d)**p),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.19653, size = 389, normalized size = 3.14 \begin{align*} \frac{1}{36} \,{\left (6 \, g^{2} x^{6} e \log \left (c\right ) + 9 \,{\left (2 \,{\left (x^{2} e + d\right )}^{2} \log \left (x^{2} e + d\right ) - 4 \,{\left (x^{2} e + d\right )} d \log \left (x^{2} e + d\right ) -{\left (x^{2} e + d\right )}^{2} + 4 \,{\left (x^{2} e + d\right )} d\right )} f g p e^{\left (-1\right )} + 18 \,{\left ({\left (x^{2} e + d\right )}^{2} - 2 \,{\left (x^{2} e + d\right )} d\right )} f g e^{\left (-1\right )} \log \left (c\right ) - 18 \,{\left (x^{2} e -{\left (x^{2} e + d\right )} \log \left (x^{2} e + d\right ) + d\right )} f^{2} p +{\left (6 \,{\left (x^{2} e + d\right )}^{3} e^{\left (-2\right )} \log \left (x^{2} e + d\right ) - 18 \,{\left (x^{2} e + d\right )}^{2} d e^{\left (-2\right )} \log \left (x^{2} e + d\right ) + 18 \,{\left (x^{2} e + d\right )} d^{2} e^{\left (-2\right )} \log \left (x^{2} e + d\right ) - 2 \,{\left (x^{2} e + d\right )}^{3} e^{\left (-2\right )} + 9 \,{\left (x^{2} e + d\right )}^{2} d e^{\left (-2\right )} - 18 \,{\left (x^{2} e + d\right )} d^{2} e^{\left (-2\right )}\right )} g^{2} p + 18 \,{\left (x^{2} e + d\right )} f^{2} \log \left (c\right )\right )} e^{\left (-1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(g*x^2+f)^2*log(c*(e*x^2+d)^p),x, algorithm="giac")

[Out]

1/36*(6*g^2*x^6*e*log(c) + 9*(2*(x^2*e + d)^2*log(x^2*e + d) - 4*(x^2*e + d)*d*log(x^2*e + d) - (x^2*e + d)^2
+ 4*(x^2*e + d)*d)*f*g*p*e^(-1) + 18*((x^2*e + d)^2 - 2*(x^2*e + d)*d)*f*g*e^(-1)*log(c) - 18*(x^2*e - (x^2*e
+ d)*log(x^2*e + d) + d)*f^2*p + (6*(x^2*e + d)^3*e^(-2)*log(x^2*e + d) - 18*(x^2*e + d)^2*d*e^(-2)*log(x^2*e
+ d) + 18*(x^2*e + d)*d^2*e^(-2)*log(x^2*e + d) - 2*(x^2*e + d)^3*e^(-2) + 9*(x^2*e + d)^2*d*e^(-2) - 18*(x^2*
e + d)*d^2*e^(-2))*g^2*p + 18*(x^2*e + d)*f^2*log(c))*e^(-1)